package javabase.schoolwork.day6_12;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fance
 * @date 18-6-13 下午12:31
 */
public class Course {
    private String name;
    private int  credit;
    private List<Student> studentList;

    public Course() {
        studentList = new ArrayList<>();
    }

    public List<Student> getStudentList() {
        return studentList;
    }

    public void setStudentList(List<Student> studentList) {
        this.studentList = studentList;
    }

    public Course(String name, int credit) {
        this.name = name;
        this.credit = credit;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", credit=" + credit +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }
}
